package org.sunflower.controller;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;

@RestController
@RequestMapping("/edg")
public class EdgController {

    @GetMapping
    public Edg get() {
        return new Edg("viper", 23);
    }


    @XmlRootElement
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Edg implements Serializable {
        private static final long serialVersionUID = -349012453592429794L;
        private String name;
        private Integer age;
    }
}
